home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / jmod311.zip / JMODEM.H < prev    next >
Text File  |  1992-02-02  |  26KB  |  339 lines

  1. /****************************************************************************/
  2. /*   FILE JMODEM.H                                                          */
  3. /*   Created 11-JAN-1990                Richard B. Johnson                  */
  4. /*                                      405 Broughton Drive                 */
  5. /*                                      Beverly, Massachusetts 01915        */
  6. /*                                      BBS (508) 922-3166                  */
  7. /*                                                                          */
  8. /*    This program requires about 67k of free RAM to execute properly.      */
  9. /*    If you have 66k or less, it will execute, but the screens will        */
  10. /*    not be written or replaced properly. If you have only 64k, the        */
  11. /*    program will exit with an error message.                              */
  12. /*                                                                          */
  13. /*    Revision History:                                                     */
  14. /*    V3.00   Beta test                  11-FEB-1990   Richard B. Johnson   */
  15. /*    V3.01   First release              18-FEB-1990   Richard B. Johnson   */
  16. /*    V3.02   Revised                    19-FEB-1990   Richard B. Johnson   */
  17. /*                                                                          */
  18. /*      (1)   A bug in MicroSoft _calloc()  allocates overlapping           */
  19. /*            buffers so data files were getting corrupted. I had           */
  20. /*            used both _calloc() and _malloc() at the same time and        */
  21. /*            they didn't like it. I changed the memory allocation          */
  22. /*            to _malloc() only and it seems to work okay.                  */
  23. /*                                                                          */
  24. /*      (2)   While debugging, I found some structures I didn't need and    */
  25. /*            removed them. Changed some code to accommodate.               */
  26. /*                                                                          */
  27. /*      (3)   Added a file-size during downloads.                           */
  28. /*                                                                          */
  29. /*      (4)   Changed code in the data encoding (compression) routine       */
  30. /*            in an attempt to speed it up.                                 */
  31. /*                                                                          */
  32. /*    V3.03   Revised                   20-FEB-1990  Richard B. Johnson     */
  33. /*                                                                          */
  34. /*      (5)   Fixed bug in compression routine where the loop wasn't        */
  35. /*            terminating properly, adding random characters. Bug was       */
  36. /*            created during V3.02 change.                                  */
  37. /*                                                                          */
  38. /*    V3.04   Revised                   27-FEB-1990  Richard B. Johnson     */
  39. /*                                                                          */
  40. /*      (1)   Modified the block-size routine and the receive-block         */
  41. /*            routine in an attempt to improve the noise immunity.          */
  42. /*            Does not abort even if you whistle into the telephone         */
  43. /*            during uploads and downloads. Waits 5 seconds to clear        */
  44. /*            the interrupt buffer when a bad block-size is received.       */
  45. /*                                                                          */
  46. /*      (2)   Added a 1/2 second wait for modem status when opening         */
  47. /*            channel. This might accommodate slow modems response to       */
  48. /*            RTS.                                                          */
  49. /*                                                                          */
  50. /*    V3.05   Revised                   22-MAR-1990  Richard B. Johnson     */
  51. /*                                                                          */
  52. /*      (1)   Removed _sprintf() runtime library calls to shorten           */
  53. /*            the code. Saved about 4k.                                     */
  54. /*                                                                          */
  55. /*      (2)   Removed extra spaces in the signon-logo to shorten            */
  56. /*            the program size.                                             */
  57. /*                                                                          */
  58. /*      (3)   Changed the method of creating a fixed-length string          */
  59. /*            for both the block size and cps numbers which saved about     */
  60. /*            800 bytes of program size.                                    */
  61. /*                                                                          */
  62. /*      (4)   Changed numerous array indexes in JMODEM_F.C to pointers      */
  63. /*            to reduce code size. Saved a few hundred bytes and should     */
  64. /*            improve speed of screen output.                               */
  65. /*                                                                          */
  66. /*      (5)   Created a local _puts() routine which saved over 6k from the  */
  67. /*            MicroSoft C runtime library version. (JMODEM_F.C)             */
  68. /*                                                                          */
  69. /*    V3.06   Revised                   07-APR-1990  Richard B. Johnson     */
  70. /*                                                                          */
  71. /*      (1)   Put the filename text into the syst structure as a pointer    */
  72. /*            to char. This allowed me to save 56 bytes of code and now     */
  73. /*            only two parameters are passed to the _screen() function.     */
  74. /*                                                                          */
  75. /*      (2)   Modified the syst structure and supporting code.              */
  76. /*                                                                          */
  77. /*      (3)   Moved all external data and functions to the JMODEM.H file.   */
  78. /*                                                                          */
  79. /*      (4)   Moved _disp() "usage" module to JMODEM_F.C                    */
  80. /*                                                                          */
  81. /*      (5)   Changed arrays in JMODEM_B.C to pointers to reduce code-      */
  82. /*            size. Eliminated _strcpy() from the command-line parsing      */
  83. /*            routines. Brought the code-size to less than 12,000 bytes.    */
  84. /*                                                                          */
  85. /*      (6)   Reduced the code-size in the _encode(), _decode(), and        */
  86. /*            _crc() routines in JMODEM_D.C. Removed shifts to improve      */
  87. /*            speed and replaced the shifts with pointers for altering      */
  88. /*            portions of the strings.                                      */
  89. /*                                                                          */
  90. /*      (7)   Made a _cancel() routine in JMODEM_A.C to send ^Xes upon      */
  91. /*            abort.                                                        */
  92. /*                                                                          */
  93. /*      (8)   Removed the bit being set "OUT 1" via the modem-control       */
  94. /*            register in the "open" routine in JMODEM_E.C. This was        */
  95. /*            causing some internal modems to lock up as they use this      */
  96. /*            bit for something. "OUT 2" is used to enable IRQ on most      */
  97. /*            clone RS-232 boards and modems. The Heathkit HZ-100 boards    */
  98. /*            will probably not work anymore because they use "OUT 1".      */
  99. /*                                                                          */
  100. /*    V3.07   Revised                   03-MAY-1990  Richard B. Johnson     */
  101. /*                                                                          */
  102. /*      (1)   Rewrote code to remove the requirement for a file buffer.     */
  103. /*            This means that th